package model.technology;
import model.player.StructureManager;


public class StructureTechnologyTreeBuilder
{
	private StructureManager sm;
	
	public StructureTechnologyTreeBuilder(StructureManager structureManager)
	{
		sm = structureManager;
	}
	
	public StructureTechnologyTree buildTree()
	{
		StructureTechnologyTree tree = new StructureTechnologyTree(sm);
		StructureVisibilityNode visibility = new StructureVisibilityNode(sm);
		StructureDefensiveDamageNode defensiveDamage = new StructureDefensiveDamageNode(sm);
		StructureUpkeepNode upkeep = new StructureUpkeepNode(sm);
		StructureArmorNode armor = new StructureArmorNode(sm);
		StructureProductionRateNode productionRate = new StructureProductionRateNode(sm);
		StructureHealthNode health = new StructureHealthNode(sm);
		StructureWorkerRadiusNode workerRadius = new StructureWorkerRadiusNode(sm);
		StructureWorkerDensityNode workerDensity = new StructureWorkerDensityNode(sm);
		productionRate.addChild(workerRadius);
		productionRate.addChild(workerRadius);
		health.addChild(armor);
		health.addChild(productionRate);
		upkeep.addChild(defensiveDamage);
		upkeep.addChild(health);
		visibility.addChild(upkeep);
		tree.setTechnologyTreeHead(visibility);
		tree.addAvailableTechnology(visibility);
		return tree;
	}
}